
import request from '@/utils/http';

// 渲染冰箱详情
export function detail(id: any) {
    return request({
        method: "get",
        url: `/biosample/equipment/detail-info/${id}`,
    });
}

// 渲染选择存冻架类型表格（规格型号）
export function shelfTypeList(params: any) {
    return request({
        method: "get",
        url: "/biosample/forzenshelftype/list",
        params,
    });
}

//渲染选择冻存盒规格表格内容
export function forzenboxtype(params: any) {
    return request({
        method: "get",
        url: "/biosample/forzenboxtype/list",
        params
    })
}


// 1. 生成分区(冻存架)模态框点击确定之后新增冻存架
export function batchAddForzenShelf(data: any) {
    return request({
        method: "post",
        url: "/biosample/forzenshelf/batch-add",
        data,
    });
}

// 2. 根据设备ID获取冻存架列表
export function getShelfByEquipmentId(equipmentId: any) {
    return request({
        method: "get",
        url: `/biosample/forzenshelf/getShelfByEquipmentId/${equipmentId}`,
    });
}

// 3. 点击生成存冻盒模态框确认之后 - 新增冻存盒
export function batchAddForzenBox(data: any) {
    return request({
        method: "post",
        url: "/biosample/forzenbox/batch-add", 
        data,
    });
}

// 4. 根据冻存架ID获取冻存盒列表
export function getBoxByShelfId(shelfId: any) {
    return request({
        method: "get",
        url: `/biosample/forzenbox/getBoxByShelfId/${shelfId}`,
    });
}

// 5. 根据冻存盒ID获取样本列表
export function getSamplesByBoxId(boxId: any) {
    return request({
        method: "get",
        url: `/biosample/samples/boxId/${boxId}`,
    });
}